package com.lagou.ipersistence.type;


import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author Yan Jiahong
 * Created on 2020/11/24
 */
public  class StringTypeHandler extends BaseTypeHandler<String>{
    @Override
    public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException {
        ps.setString(i, parameter);
    }

    @Override
    public String getNonNullResult(ResultSet rs, String columnName) throws SQLException {
        return rs.getString(columnName);
    }
}
